<template>
	<view class="examCard" @click="handleClick(examListItem.id)">
		<view class="top">
			<view class="title">
				{{examListItem.name}}
			</view>
			<view class="">组卷方式：<text>{{examListItem.paperTypeName}}</text>&emsp; 总分：<text>{{examListItem.totalScore}}</text></view>
		</view>
		<view class="middle">
			<view class="left">
				<view class="testType" v-for="(typeItem,typeIndex) in examListItem.tpm" :key="typeIndex">
					<view class="subTitle">{{typeItem.name}}</view>
					<view class="testNum">分值:<text>{{typeItem.queScore}}</text>分 总分:<text>{{typeItem.totalScore}}</text>分
					&ensp; 题数:<text>{{typeItem.easyCount+typeItem.middleCount+typeItem.hardCount}}</text>题</view>
				</view>
			</view>
			<u-icon class="enterArrow" name="arrow-right" color="#EEEEEE" size="28"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		props:{
			examListItem: Object,
		},
		methods: {
			handleClick(paperId) {
				this.$emit('enterPracExam',paperId)
			}
		},
		onLoad() {
			// for()
		}
	}
</script>

<style lang="scss">
	.examCard {
		box-shadow: 0 0 5px 1px rgba($color: #000000, $alpha: 0.1);
		margin: 15upx;
		border-radius: 15upx;
		padding: 11upx 0;
		color: #7f878c;

		.top {
			padding: 10upx 20upx;
			border-bottom: dashed 1px #EEEEEE;
			size: 30upx;

			text {
				color: #00e676;
				font-weight: bold;
				margin-right: 15upx;
				line-height: 50upx;
			}

			.title {
				color: $theme-color;
				font-size: 36upx;
				font-weight: bold;
			}
		}

		.middle {
			margin: 5rpx auto 5rpx 20upx;
			font-size: 30upx;
			color: #7f878c;
			display: flex;
			justify-content: space-between;

			// background-color: #0077AA;
			.left {
				line-height: 50upx;

				.testType {
					display: flex;
					line-height: 55upx;

					.subTitle {
						font-size: 32upx;
						color: #000000;
						font-weight: bold;
						padding-right: 30upx;
					}

					text {
						color: #00e676;
						font-weight: bold;
					}
				}

			}

			.enterArrow {
				// margin-left: 200upx;
				// margin: 20rpx;
			}
		}
	}
</style>
